from celery import shared_task

from utils.connect_redis import connect_redis

connect = connect_redis(11)

# 保存
def redis_save(*args,**kwargs):
    key = kwargs.get('key','')
    value = kwargs.get('value','')
    connect.set(key,value)

# 删除
def redis_delete(*args,**kwargs):
    key = kwargs.get('key','')
    connect.delete(key)

# 查询值
def redis_query(*args,**kwargs):
    key = kwargs.get('key', '')
    return connect.get(key)